package com.ankur.fareplease.strategy.impl;

import com.ankur.fareplease.model.FareDAO;
import com.ankur.fareplease.strategy.CityTaxiFare;

public class MeruCabFare implements CityTaxiFare {

	@Override
	public float getFare(FareDAO fareDAO) {
		float final_fare=0;
		float totalKMS=fareDAO.getKms();
		if(totalKMS <= 1) {
			final_fare=24;
		}
		else
		{
			final_fare=(float)((totalKMS * 17)+7);
		}
		if(fareDAO.isNightFare())
		{
			final_fare=(float) (final_fare * 1.25);
		}
		return final_fare;
	}

}
